import matplotlib.pyplot as plt
import pandas as pd
import numpy as np

plt.rcParams['font.sans-serif'] = ['STHeiti', 'PingFang SC', 'Heiti TC', 'Microsoft YaHei', 'SimHei', 'Arial Unicode MS']  
plt.rcParams['axes.unicode_minus'] = False

df = pd.read_csv("data-9.csv").set_index("类型").T


fig, axs = plt.subplots(1, 2, figsize=(8, 3))

ylabel_list = ["光伏日出力曲线", "风电日出力曲线"]
name_list = ["光伏", "风电"]
# ylim_list = [(), (0, 500000)]
for idx, ax in enumerate(axs):
    # 绘图
    ax.plot(df[name_list[idx]], marker="o")
    ax.set_ylim(-100000, 1050000)
    ax.set_xlabel("时间")
    ax.set_ylabel(ylabel_list[idx])
    # plt.xticks(range(0, 21, 4))  # 不显示x轴刻度
    ax.set_yticks([])  # 不显示y轴刻度
    # plt.title("充电负荷趋势图")
    
plt.tight_layout()
plt.show()
